package com.itbaizhan.test.exercise;

/**
 * 抽象类
 */
public abstract class Animal3 {
    int age;
    public abstract void rest();
    public abstract void run();

    public void shout(){
        System.out.println("Animal3.shout");
      //  Animal3 a = new Animal3(); //抽象类不可以被new,是用赤实现


    }
}
class Dog3 extends Animal3{

    @Override
    public void rest() {

    }

    @Override
    public void run() {

    }
}
class Cat3 extends Animal3 {

    @Override
    public void rest() {

    }

    @Override
    public void run() {

    }
}